﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GoodFit._Default" %>


<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<head>
<script src="Scripts/jquery-1.8.2.js" type="text/javascript"></script>
<script>
    $(document).ready(function () {
		    $.getJSON("api/Task", function (data) {
		        $('#usersection').empty();
		        $.each(data, function (key, val) {
		            var row = "<tr><td>" + val.Id + "</td><td>" + val.AreaPath + "</td><td>" + val.AssignedTo + "</td><td>" + val.CompletedWork +
                        "</td><td>" + val.CreatedBy + "</td><td>" + val.CreatedDate + "</td><td>" + val.InterationPath +
                        "</td><td>" + val.OriginalEstimate + "</td><td>" + val.Priority + "</td><td>" + val.ProjectFriendName +
                        "</td><td>" + val.ProjectName + "</td><td>" + val.State + "</td></tr>";
		            $(row).appendTo($('#usersection'));
		        });
		    });
		});
</script>
</head>
    <h2>TaskList</h2>
    <br />
    <table>
        <thead>
            <tr>
                <td>Id</td>
                <td>Area Path</td>
                <td>AssignedTo</td>
                <td>CompletedWork</td>
                <td>CreatedBy</td>
                <td>CreatedDate</td>
                <td>InterationPath</td>
                <td>OriginalEstimate</td>
                <td>Priority</td>
                <td>ProjectFriendName</td>
                <td>ProjectName</td>
                <td>State</td>
            </tr>
        </thead>
        <tbody id="usersection">
        </tbody>
    </table>
    <br />
    <br />
    <br />
    <br />
    <br />
<br />
    <br />
</asp:Content>


    
